var glob = require('glob');
var fs = require("fs");

var entryHtml = glob.sync(__dirname + '/src/comment/*.jsx');
var readTxt = {};
for (var i = 0; i < entryHtml.length; i++) {
    var fileName = entryHtml[i].slice(entryHtml[i].lastIndexOf('/') + 1, -4);
    readTxt[fileName.toLocaleLowerCase()] = fileName.toLocaleLowerCase()
}
readTxt = JSON.stringify(readTxt)

fs.writeFile("files.json", readTxt, function(err) {
    if (err) throw err;
    console.log("files.txt Saved !");
});
